/*
 * Copyright (c) 2010-2011, okazoh_tk. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *  - Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 *  - Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 *  - Neither the name of the copyright holder nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef ALKES_CORE_TYPES_H_INCLUDED_
#define ALKES_CORE_TYPES_H_INCLUDED_

#include "alkes/internal.h"
#include "alkes/math/TFixed.h"
#include "alkes/math/TVector2.h"
#include "alkes/math/TVector3.h"
#include "alkes/core/TRect.h"
#include "alkes/core/TColor.h"

namespace alkes {

/// \addtogroup core
//@{

template struct AL_EXPORT TVector2<float>;
template struct AL_EXPORT TVector2<int16_t>;
template struct AL_EXPORT TRect<int16_t>;
template struct AL_EXPORT TRectSize<int16_t>;
template struct AL_EXPORT TColor<uint8_t>;

typedef TVector2<float> Vector2D;
typedef TVector2<int16_t> Point2D;
typedef TRect<int16_t> Rect;
typedef TRectSize<int16_t> RectSize;
typedef TColor<uint8_t> Color;

typedef TVector3<float> Vector3D;

// utility classes
class AL_EXPORT UVector2D
    : public Vector2D
{
public:
    UVector2D();
    UVector2D(Vector2D::value_type x_pos, Vector2D::value_type y_pos);
};

class AL_EXPORT UVector3D
    : public Vector3D
{
public:
    UVector3D();
    UVector3D(Vector3D::value_type x_pos, Vector3D::value_type y_pos, Vector3D::value_type z_pos);
};

class AL_EXPORT UPoint2D
    : public Point2D
{
public:
    UPoint2D();
    UPoint2D(Point2D::value_type x_pos, Point2D::value_type y_pos);
    UPoint2D(const Rect& rect);
};

class Image;

class AL_EXPORT URect
    : public Rect
{
public:
    URect();
    URect(const Rect& rect);
    URect(Rect::value_type x_pos, Rect::value_type y_pos, Rect::value_type w, Rect::value_type h);
};

class AL_EXPORT URectSize
    : public RectSize
{
public:
    URectSize();
    URectSize(const RectSize& size);
    URectSize(const Rect& rect);
    URectSize(RectSize::value_type width, RectSize::value_type height);
};

class AL_EXPORT UColor
    : public Color
{
public:
    UColor(Color::value_type red, Color::value_type green, Color::value_type blue, Color::value_type alpha);
};

//@}

}

#endif
